A modem pass-through can be used to provide a modem connection for transporting modem data between a calling modem and an answering modem over a packet network. The modem pass-through emulates a PSTN network when transporting a G.711 Pulse Code Modulation (xe2x80x9cPCMxe2x80x9d) stream over the packet network. To emulate a PSTN network the modem pass-through provides the modem connection between the calling modem and the answering modem similar to the modem connection provided by the PSTN network.
The packet network can implement any well-known packet network protocol, such as, the Asynchronous Transfer Method (xe2x80x9cATMxe2x80x9d), Frame Relay protocol (xe2x80x9cFRxe2x80x9d) or Internet Protocol (xe2x80x9cIPxe2x80x9d). The modem pass-through forwards the G.711 PCM stream using protocols developed for transmitting real-time audio over a packet network. One standard protocol for packetizing real-time audio for transporting Voice over IP (xe2x80x9cVoIPxe2x80x9d) is the Real-Time Transport Protocol (xe2x80x9cRTPxe2x80x9d) (Request for Comments (xe2x80x9cRFCxe2x80x9d) 1889, January 1996) available on the Internet Engineering Task Force (xe2x80x9cIETFxe2x80x9d) web site.
To transport VoIP, a packet transmitter in an originating packet network node encodes the analog voice signal received from the PSTN, stores the encoded data in the payload of one or more data packets and transmits the data packet over the packet network. Each data packet includes a destination address stored in a header included in the data packet.
Before the modem connection is provided, the calling modem and the answering modem must perform modem training. Modem training includes negotiating communication parameters such as, data transfer rate, data compression, error correction protocol and modulation. Modem training includes a series of training steps, in which the calling modem and the answering modem adjust to each other""s characteristics and to the characteristics of the switched connection. These training steps include V.8/V.8bis, auto-mode, error correction and data compression. The steps and procedures are defined by the ITU V. series of modem specification and other modem specifications including MNP5 compression. ITU V. series modem specifications include V.8, V8bis, V.42, V.42bis, V.34, V.90, V.92, and V.32/V.32bis.
Once modem training is complete, the modem connection is provided by the modem pass-through between the calling modem and the answering modem. However, data can only be transported between the modems while the modem connection is provided by the modem pass-through.
Unlike a telephone network in which there is a dedicated connection between the calling modem and the answering modem, each data packet transmitted from a modem may travel on a different path from a source packet network gateway to a destination packet network gateway connected to the packet network. Some data packets may travel faster than others. Thus, data packets transmitted over the packet network may arrive out of order at the destination packet network gateway.
To compensate for these path differences, each packet network gateway includes ajitter buffer. The jitter buffer temporarily stores PCM data extracted from the payload of data packets received from the packet network. The PCM data is forwarded in-order after a playout delay to the modem. Temporarily storing received PCM data in ajitter buffer allows a smooth ordered playout of the extracted PCM data to the modem.
Each packet network gateway includes a separate clock source. The clock sources are not synchronized. The remote clock source determines the rate at which data packets are received by the local packet network gateway from the remote packet network gateway over the packet network. The local clock source determines the rate at which the packet network gateway reads the extracted PCM data from the jitter buffer. Thus, timing differences accumulate at both the local packet network gateway and the remote packet network gateway because the local clock source and the remote clock source are not synchronized. These timing differences result in a progressive accumulation of PCM data stored in the jitter buffer at one packet network gateway and a progressive depletion of PCM data stored in another jitter buffer at another packet network gateway. Eventually, the jitter buffer in a packet network gateway with either underflow or overflow. During these overflow/underflow periods, the jitter buffer provides incorrect data resulting in modem speed shifts and/or modem retrains. Modem retrains reduce data throughput through the packet network because no data packets are transmitted during the modem retrain.
In order to avoid modem retrains, a packet network gateway computes a playout delay time for its respective jitter buffer. Adaptive delay adjustment is implemented by continuously monitoring the playout delay time and periodically readjusting the playout delay in order to compensate for the difference between the local clock source and the remote clock source. However, even with adaptive delay adjustment to continuously adapt the playout delay, a clock slip is unavoidable resulting in modem retrains and/or speed shifts. These modem retrains and/or modem speed shifts result in decreased throughput on the modem connection and the inability to emulate a PSTN network over a packet network for modem transfer rates required by fast modems, such as V.90.
We present a method for reducing the frequency of modem retrains in a modem pass-through by compensating for asynchronous clocks. A buffer having a preselected playout delay, is provided for storing frames received from a packet network. Upon detecting a buffer overflow, a drain operation is performed on the buffer and the playout delay is modified to provide a sufficient number of buffer locations for frames to be stored.
Upon detecting a buffer underflow, a fill operation is performed on the buffer and the playout delay is modified to provide a sufficient number of frames to be played out.
A buffer underflow or buffer overflow may be triggered upon detecting a reset message received from the packet network dependent on the number of frames stored in the buffer. The data stored in the buffer may be modem data or fax data.
A resampling buffer may be provided for storing data forwarded from the buffer. An estimated clock difference between the asynchronous clock sources is monitored and a clock slip operation is performed in the resampling buffer dependent on the estimated clock difference. If the estimated clock difference is a frame slip forward, the clock slip operation decimates the frame stored in the resampling buffer at a clock rate dependent on the estimated clock difference. If the estimated clock difference is a frame slip backward and the clock slip operation forwards a frame stored in the resampling buffer which has been interpolated at a clock rate dependent on the estimated clock difference.